-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup dead code and incorrect use of go routine in context pkg #1320
Cleanup dead code and incorrect use of go routine in context pkg #1320
Conversation
Thanks @tharun208 Now another approach instead of deleting the code would be to make it work. That would be a non trivial effort since it isn't working right now and is untested. Given that no users has asked for these features, and to implement properly I think they would require generating timer commands I am fine to remove it. There are still some references to the removed code such as:
That we should remove |
6b296fc
to
01c6e4e
Compare
@Quinn-With-Two-Ns done removed the mentioned snippet |
01c6e4e
to
abba2c2
Compare
internal/context.go
Outdated
s.AddReceive(child.Done(), func(c ReceiveChannel, more bool) {}) | ||
s.Select(parent) | ||
}() | ||
panic("parent context not found") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this panic statement is wrong and misleading. The issue is not that the parent context is not found, the issue is the parent context is cancellable, but does not have a *cancelCtx
in it's hierarchy. We should reflect that in the panic message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated the message
abba2c2
to
04f8e83
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
What was changed
Cleaned up dead code in context pkg and replaced incorrect use of go routine in
propogateCancel
with a panic msgWhy?
Clean tech-debt from context pkg
Checklist
Closes Clean up internal/context #1270
How was this tested:
local test-suites
Any docs updates needed?
No